xen/arm: map_regions_rw_cache: Map the region with p2m->default_access
authorJulien Grall <julien.grall@arm.com>
Tue, 12 Jul 2016 13:59:28 +0000 (14:59 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 13 Jul 2016 17:35:48 +0000 (18:35 +0100)
commitabea864be5bf96608165c4cc2704da1da4cad3d5
tree14bfd6d83addec7e321925c1e20f3f7cb1c65a29
parent6dbf3f0e3074c76b1083eec3739be1a8761ad3dc
xen/arm: map_regions_rw_cache: Map the region with p2m->default_access

The parameter 'access' is used by memaccess to restrict temporarily the
permission. This parameter should not be used for other purpose (such
as restricting permanently the permission).

Instead, we should use the default access requested by memacess. When it
is not enabled, the access will be p2m_access_rwx (i.e no restriction
applied).

The type p2m_mmio_direct will map the region read-write and
non-executable before any further restriction by memaccess. Note that
this is already the resulting permission with the curreent combination
of the type and the access. So there is no functional change.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/p2m.c